from flask import Blueprint


def create_module(name: str, import_name: str = None):
    """
    创建模块

    :param name: 模块名称
    :param import_name: 模块包名
    :return:
    """
    if import_name is None:
        import_name = f'services._{name}'
    return Blueprint(name=name, import_name=import_name, url_prefix=f'/{name}')
